package com.jintoufs.web.action.quartz;

import com.jintoufs.domain.baseinfo.Ticker;
import com.jintoufs.domain.constants.Constants;
import com.jintoufs.service.baseinfo.CoinService;
import com.jintoufs.service.baseinfo.SiteService;
import com.jintoufs.service.baseinfo.TickerService;
import com.jintoufs.util.DyMethodUtil;
import com.jintoufs.util.date.DateUtils;
import com.jintoufs.util.http.HttpRequest;
import com.jintoufs.util.http.HttpsClientUtils;
import com.jintoufs.web.action.support.SupportAction;
import org.apache.commons.lang.StringUtils;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author xiaoemo
 */
@Controller
@Scope("prototype")
@RequestMapping("/site")
public class TickerQuartzAction extends SupportAction {
    @Resource
    private TickerService tickerService;


    /**
     * 删除过去数据
     */
    public void deleteOverTimeDataTask() throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("date", DateUtils.getPreHoursStr(1));
        tickerService.deleteByParams(params);
        tickerService.getBinanceSymbols();
    }

}
